package com.llgz.hotelmanageapi.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author Bernie_fang
 * @Description:
 * @create 2021/7/8 14:08
 **/
@MapperScan("com.llgz.hotelmanageapi.mapper")  //mapper扫描文件夹
@EnableTransactionManagement
@Configuration
public class MyBatisPlusConfig {

    //分页插件
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
